<template>
  <div>
    <el-row>
      <el-col :span="12"
        ><div class="grid-content">
          <v-chart :options="option1" :watchShallow="true" :auto-resize="true" :style="{ width: '100%', height: '100%' }" /></div
      ></el-col>
      <el-col :span="12"
        ><div class="grid-content"><v-chart :options="option2" :watchShallow="true" :auto-resize="true" :style="{ width: '100%', height: '100%' }" /></div
      ></el-col>
    </el-row>
  </div>
</template>
<script>
export default {
  name: 'stafftransfer',
  data() {
    return {
      option1: {
        title: {
          text: '天然气支出金额走势图',
          left: 'center'
        },
        xAxis: {
          type: 'category',
          data: ['12月', '11月', '10月', '9月', '8月', '7月', '6月', '5月', '4月', '3月', '2月', '1月']
        },
        yAxis: {
          type: 'value'
        },
        label: {
          show: true,
          position: 'top',
          color: '#333333'
        },
        series: [
          {
            data: [7003, 8023, 8324, 8893, 7923, 8434, 8032, 9001, 7802, 8239, 8435, 8531],
            type: 'bar',
            itemStyle: {
              color: '#4874cb'
            }
          }
        ]
      },
      option2: {
        title: {
          text: '燃气支出扇形情况图',
          left: 'center'
        },
        tooltip: {
          trigger: 'item'
        },
        legend: {
          top: '5%',
          left: 'center'
        },
        series: [
          {
            type: 'pie',
            radius: ['40%', '70%'],
            avoidLabelOverlap: false,
            label: {
              show: false,
              position: 'center'
            },
            emphasis: {
              label: {
                show: true,
                fontSize: 20,
                fontWeight: 'bold'
              }
            },
            labelLine: {
              show: false
            },
            data: [
              { value: 7003, name: '12月' },
              { value: 8023, name: '11月' },
              { value: 8324, name: '10月' },
              { value: 8893, name: '9月' },
              { value: 7923, name: '8月' },
              { value: 8434, name: '7月' },
              { value: 8023, name: '6月' },
              { value: 9001, name: '5月' },
              { value: 7082, name: '4月' },
              { value: 8239, name: '3月' },
              { value: 8435, name: '2月' },
              { value: 8531, name: '1月' }
            ]
          }
        ]
      }
    };
  }
};
</script>
<style lang="scss" scoped>
.grid-content {
  height: 90vh;
  margin-top: 20px;
}
.table-sty {
  margin: 20px;
}
</style>
